package it.enricod.jcontextfree.engine.model.impl;

import java.util.ArrayList;
import java.util.List;

import it.enricod.jcontextfree.engine.model.IRuleDef;
import it.enricod.jcontextfree.engine.model.IShape;

public class RuleDef implements IRuleDef{

	private final String ruleName;
	private final float weight;
	private List<IShape> shapes = new ArrayList<IShape>();

	public RuleDef(String ruleName) {
		this( ruleName, 1.0f);
	}
	
	public RuleDef(String ruleName, float weight) {
		this.ruleName = ruleName.trim();
		this.weight = weight;
	}

	public String getRuleName() {
		return ruleName;
	}


	public Float getWeight() {
		return weight;
	}

	public void addShape(IShape shape) {
		this.shapes.add( shape );
	}

	public List<IShape> getShapes() {
		return shapes;
	}

}
